//
//  MyRotatingButton.h
//  CanYouDoIt
//
//  Created by hoangtx on 7/11/13.
//
//

#ifndef CanYouDoIt_MyRotatingButton_h
#define CanYouDoIt_MyRotatingButton_h

#include "MySpriteButton.h"
using namespace cocos2d;

class MyRotatingButton : public MySpriteButton{
public:
    CCPoint originPoint;
    CCPoint originalOriginPoint;
    double originalAngle;
    double originalVelocity;
    CCPoint originalPoint;
    
    double currentAngle;
    double angleVelocity;
    double radius;
    double maxSpeed;
    bool isAtMaxSpeed();
    void changeDirection();
    virtual void randomDirection();
    virtual void resetState();
    void increseVelocityBy(double radDegree);
    virtual void handleUpdate(float dt);
    virtual void setCircle(CCPoint mOrigin,double mRadius);
    static MyRotatingButton* create(const char* fileName, double mX,double mY,double mWidth,double mHeight);
    virtual bool init();
    CREATE_FUNC(MyRotatingButton);
};


#endif
